Enhancements protocol configuration markers - #3504
Conversation
…rkers datum generation and updatedefault protocol parameters
There was a problem hiding this comment.
Pull request overview
This PR improves the protocol configuration markers workflow (post-#3393) by enhancing operational documentation, adding an “emergency” CLI mode to skip a safety guard during datum generation, and increasing observability by logging fetched Mithril network configuration in both signer and aggregator components.
Changes:
- Add debug logging of fetched
MithrilNetworkConfigurationin the signer state machine and aggregator epoch service. - Add
--forceto the protocol-configuration import markers command to bypass on-chain configuration verification. - Update the protocol-configuration markers runbook and adjust aggregator JSON configs for
preview/dev.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| mithril-signer/src/runtime/state_machine.rs | Adds debug logging for the fetched network configuration. |
| mithril-aggregator/src/services/epoch_service.rs | Adds debug logging for the fetched network configuration during epoch informing. |
| mithril-aggregator/src/commands/protocol_configuration_command.rs | Introduces --force on import-markers and updates default protocol parameters; updates CLI parsing test. |
| mithril-aggregator/config/preview.json | Removes protocol_parameters and adds protocol-configuration reader adapter config and other settings for preview. |
| mithril-aggregator/config/dev.json | Removes protocol_parameters and updates adapter-related configuration keys. |
| docs/runbook/protocol-configuration-markers/README.md | Improves runbook commands/output examples and formatting; updates env var naming. |
Suppressed comments (2)
docs/runbook/protocol-configuration-markers/README.md:142
- Wording: “informations” should be “information”.
Execution of previous command must return following informations :
docs/runbook/protocol-configuration-markers/README.md:153
- Spelling in the added command output: “Sucessfully” should be “Successfully”.
Sucessfully wrote Tx datum file at **YOUR_ASSET_PATH**/protocol-configurations-datum.json
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| debug!( | ||
| self.logger, | ||
| "Mithril network configuration: {network_configuration:?}" | ||
| ); |
| debug!( | ||
| self.logger, | ||
| "Mithril network configuration: {network_configuration:?}" | ||
| ); |
| let tools = ProtocolConfigurationTools::from_dependencies(dependencies) | ||
| .await | ||
| .with_context(|| "protocol-configuration-tools: initialization error")?; | ||
| tools.verify_configurations_against_chain(protocol_configurations.clone())?; | ||
|
|
||
| // 4: Verify protocol configuration against on chain configuration | ||
| if self.force { | ||
| println!("/!\\ --force option is set, bypassing the verification against chain /!\\"); | ||
| } else { | ||
| println!("Verifying protocol configuration against on chain configuration..."); | ||
| tools.verify_configurations_against_chain(protocol_configurations.clone())?; | ||
| } |
| ./mithril-aggregator protocol-configuration export-markers --target-path $ASSETS_PATH/protocol-configurations.json | ||
| ``` | ||
|
|
||
| Execution of previous command must return following informations : |
| ```bash | ||
| No protocol configurations found on chain, getting default protocol configurations output file... | ||
| Generating JSON protocol configurations output file... | ||
| Sucessfully wrote JSON protocol configurations file at **YOUR_ASSET_PATH**/protocol-configurations.json |
| ``` | ||
|
|
||
| And create the variable `TX_IN_DATUM={TxHash}#{TxIn}` by replacing with values from the previous command (where inline datum are available): | ||
| And create the variable `TX_IN_DATUM={TxHash}#{TxIn}` by replacing with values from the previous command (where inlineDatum are available): |
| ./mithril-aggregator protocol-configuration import-markers --import-path $ASSETS_PATH/protocol-configurations.json --target-path $ASSETS_PATH/protocol-configurations-datum.json | ||
| ``` |
Test Results 5 files ± 0 221 suites ±0 56m 27s ⏱️ - 1h 4m 15s Results for commit 9ab8cb2. ± Comparison against base commit df38c0c. This pull request removes 57 tests. |
Content
Minor update after #3393
import-markerscommand,--force, which bypasses theverify_configurations_against_chainfunction when producing the datum filemithril-aggregator/config(removingprotocol_parameters, addingprotocol_configuration_reader_adapter_configforpreview)Pre-submit checklist
This PR closes #3503